home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 626-637 / disk_635 / powerlogo / users-guide < prev    next >
Text File  |  1992-05-06  |  55KB  |  1,566 lines

  1.  
  2.    Power LOGO
  3.    Release 1.1
  4.    by  Gary Teachout
  5.  
  6.  
  7. DISTRIBUTION            * * * * * * * * * * * * * * * * * * * * * *
  8.  
  9.    Copyright 1990 by Gary Teachout
  10.  
  11.    This program is freeware, and may be distributed freely. It may be
  12. distributed along with other freely distributable software. It may not be
  13. sold for profit, or included as part of a commercial software product.
  14. Power LOGO should be distributed together with the entire contents of the
  15. "PowerLOGO" directory. No donations are required but they would be accepted
  16. and appreciated.
  17.  
  18. Contents of the "PowerLOGO" directory:
  19.  
  20. LOGO                 The Power LOGO interpreter.
  21. LOGO-Startup         The startup file to initialize LOGO.
  22. Users-Guide          This doc file.
  23. Quick-Ref            A categorized list of the Power LOGO primitives.
  24. Whats-New            Changes since release 1.0.
  25. Utilities            Some useful LOGO programs, ect.
  26. Utilities.doc        About the Utilities file.
  27. PathMaster (dir)     Doc files for the PathMaster file selector
  28.                      by Justin V. McCormick.
  29. ILBM.Library         A library for loading and saving pictures, by Software
  30.                      Dissidents. This should be placed in the libs
  31.                      directory on your Workbench disk.
  32.  
  33.  
  34. DISCLAIMER              * * * * * * * * * * * * * * * * * * * * * *
  35.  
  36.    THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
  37. EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ITS FITNESS FOR ANY
  38. PARTICULAR PURPOSE. This software is experimental and IT HAS DEFECTS, if
  39. you do not accept all of the risks and responsibilities of using defective
  40. software, then DO NOT USE THIS.
  41.  
  42.  
  43. POWER LOGO?             * * * * * * * * * * * * * * * * * * * * * *
  44.  
  45.    Power LOGO is an experimental dialect of the LOGO programming language,
  46. with a few lisp like features, and a few simplifications. I tried to make
  47. few assumptions about how you may want to use this language, wherever
  48. possible features are provided as options.
  49.    User defined procedures are not limited to a fixed number of inputs,
  50. they may be defined with required inputs, optional inputs, and local
  51. variables.
  52.    User defined procedures are just variables that contain a special type
  53. of list, and are defined using the "make" primitive (Power LOGO has no "to"
  54. or "end" primitive). This allows procedures to be processed as data.
  55.    Syntax is Straight Polish (prefix only), inputs to a procedure follow to
  56. the right of the procedure name. There is no infix arithmetic, no special
  57. delimiters, and no exceptions in syntax. All LOGO objects (words, lists,
  58. list brackets, and parenthesis) must be separated by a space, or by a
  59. linefeed.
  60.    Much of the Amiga graphics capability is supported. Primitives are
  61. provided to open custom intuition screens and windows, draw lines,
  62. patterned lines, text, flood fills, copy regions, and for turtle graphics.
  63.    All primitives and keywords are lower case, all names and data defined
  64. may be any case. Most other versions of LOGO (and Lisp) promote all text to
  65. upper case on input.
  66.    Demons (high-level interupts) may be programmed to respond to events
  67. from the keyboard, menus, left mouse button, and window close gadgets.
  68.    There is no built-in text editor. LOGO stores programs as ASCII text
  69. files, which may be created and modified using any text editor. Or you may
  70. type them at the command window.
  71.    Menus may be attached to any window. Along with menu demons this allows
  72. LOGO programs to have friendly user interfaces. You may customize the LOGO
  73. user interface by attaching your own menus to the LOGO command window.
  74.    Properties are just variables that contain a special type of list.
  75. Properties give LOGO a data base like capibility.
  76.    Support for Workbench, and CLI arguments is provided by the "argslist"
  77. primitive, but LOGO does nothing with this information, it is up to a
  78. program running in LOGO to make use of this capability. The default
  79. "LOGO-Startup" file will load any files named as arguments when LOGO is
  80. first run.
  81.    Power LOGO provides many primitives not typicaly found in LOGO.
  82. Primitives for arithmetic (frac, log, power...), flow of control (cond,
  83. dowhile, whenmenu, while...), words and lists (alphap, items, repitem,
  84. represt, restof...), and others.
  85.  
  86.  
  87. REQUIREMENTS            * * * * * * * * * * * * * * * * * * * * * *
  88.  
  89.    Power LOGO should run on most Amiga computers, it requires about 250 K
  90. bytes, but can use all available memory if needed. To use the "saveimage",
  91. and "loadimage" commands, your LIBS: directory must contain the
  92. "ILBM.Library" by Software Dissidents.
  93.  
  94.  
  95. GETTING STARTED         * * * * * * * * * * * * * * * * * * * * * *
  96.  
  97.    LOGO may be run in the usual way from the WorkBench or the CLI. You may
  98. exit LOGO by entering the quit command.
  99.    If a file called LOGO-Startup is found in the same directory with LOGO
  100. it will be loaded to initialize LOGO. This file should contain LOGO code
  101. that may be used to configure LOGO the way you like, and to load your own
  102. frequently used procedures, and data.
  103.    LOGO opens a window on the workbench screen as its command input and
  104. output window. You may enter and edit LOGO commands with these special
  105. keys.
  106.  
  107.    Backspace            Delete character to the left of the cursor.
  108.    Cursor Right         Move cursor right one space.
  109.    Cursor Left          Move cursor left one space.
  110.    Cursor Up            Move backward through the command history.
  111.    Cursor Down          Move forward through the command history.
  112.    Control-G            Stop program, return to top level.
  113.    Control-K            Delete from cursor to end of line.
  114.    Control-U            Delete from cursor to start of line.
  115.    Control-X            Delete the line.
  116.    Delete               Delete character under the cursor.
  117.    Return               Enter list or instructions.
  118.    Shift Cursor Right   Move cursor to end of line.
  119.    Shift Cursor Left    Move cursor to start of line.
  120.  
  121.    The "? " prompt means LOGO is waiting for a command. If the command
  122. line contains an open list (an open bracket " [ " without a closing
  123. bracket " ] ") you will see the "1 > " prompt allowing you to continue the
  124. list on another line.
  125.  
  126.  
  127. PROGRAMMING             * * * * * * * * * * * * * * * * * * * * * *
  128.  
  129.    In the Power LOGO programming environment, everything is either a word
  130. or a list. Words can be any sequence of characters. Words are separated
  131. from each other by blank spaces, to include a space (or a backslash) in a
  132. word it must be preceded by a backslash (\). Numbers are just a special
  133. type of word. Numbers prefixed with an "@" symbol will be recocnized by
  134. some procedures as pointers. Lists can be any sequence of objects, which
  135. may be ether words or lists. Lists are identified by enclosing them in
  136. brackets "[]".
  137.  
  138.    This-is-a-word!
  139.    [ This is a list! ]
  140.  
  141.    Words and lists may be either data or instructions. An instruction is a
  142. procedure name followed by any inputs the procedure may require. When LOGO
  143. tries to evaluate a word it may treat it in one of three ways, as a
  144. literal, as a variable, or as a procedure. Words preceded by a quote (")
  145. character (called quoted words) are literal and evaluate as the word
  146. itself. For words that happen to be numbers or pointers the quote is not
  147. needed. Words preceded by a colon (:) character (called dotted words) refer
  148. to the contents (binding) of a variable name. A word by itself (no dots or
  149. quote) is evaluated as a procedure (unless it is a number or pointer).
  150.  
  151.    ? print 123
  152.    123
  153.  
  154. Here "print" is a procedure, and the number "123" is its input. The "print"
  155. procedure simply prints its inputs on next line in the command window.
  156.  
  157.    ? print [ This is a list! ]
  158.    This is a list!
  159.  
  160. In this example the list (everything between the brackets) is the input to
  161. the "print" command. 
  162.  
  163.    ? print "This-is-a-word!
  164.    This-is-a-word!
  165.  
  166. In this example the quote (") identifies the input as a literal word.
  167.    The inputs to a procedure need not be literal, they may be the contents
  168. of a variable, or the output of another instruction. Instructions may be
  169. nested as inputs within other instructions.
  170.  
  171.    ? pr * 7 6
  172.    42
  173.  
  174. Here "*" is another procedure "6" and "7" are its inputs. "*" outputs the
  175. product of its inputs to pr ("pr" is just an abbreviation for "print")
  176. which prints it on the next line.
  177.  
  178.    ? make "x 100
  179.    ? pr :x
  180.    100
  181.  
  182. In the first line the "make" procedure assigns 100 as the contents of the
  183. variable "x". In the second line ":x" refers to the contents of "x".
  184.    Each procedure has some number of required inputs (zero or more), and
  185. some number of optional inputs (zero or more). To include optional inputs
  186. the entire instruction must be enclosed in parenthesis. If only the
  187. required inputs are used, the parenthesis are not needed. Print requires
  188. one input but may have many.
  189.  
  190.    ? ( pr "PI "= 3.1415 )
  191.    PI = 3.1415
  192.  
  193. In this instruction "pr" has three inputs.
  194.  
  195.    ? ( pr [ And the answer is ] * 4 ( + 1 2 3 ) )
  196.    And the answer is 24
  197.  
  198. This entire line is one instruction where "pr" has two inputs, the first 
  199. is the list "[ And the answer is ]", the second is the instruction
  200. "* 4 ( + 1 2 3 )". This second instruction "*" has two inputs "4" and
  201. another instruction "( + 1 2 3 )".  
  202.    Primitives are the procedures that are bult-in to LOGO. You may define
  203. your own procedures and add them to LOGO. In Power LOGO a procedure is just
  204. a variable that contains a special type of list, and may be defined using
  205. the "make" primitive. The first item in a procedure definition list is the
  206. word procedure. The second item is a list of lists of names of the inputs
  207. and local variables used by the procedure (the names list). The rest of the
  208. items in the definition are the instructions executed by the procedure.
  209.  
  210.    ? make "hello [ procedure [ ] pr [ Hello World ! ] ]
  211.    ? hello
  212.    Hello World !
  213.  
  214. Because this example procedure uses no inputs or local variables the names
  215. list may be empty.
  216.    The first item of the variable names list is a list of required inputs.
  217. The second item is a list of optional inputs or a name to receive a list of
  218. optional inputs. The third item is a list of names of local variables.
  219. Local variables and unused optional inputs contain the empty list at the
  220. start.
  221.  
  222.    ? make "hello [
  223.    1 > procedure [ [ ] [ :n ] ]
  224.    1 > repeat if numberp :n [ :n ] [ 1 ] [
  225.    2 > pr [ Hello World ! ] ] ]
  226.  
  227.    ? hello
  228.    Hello World !
  229.  
  230.    ? ( hello 3 )
  231.    Hello World !
  232.    Hello World !
  233.    Hello World !
  234.  
  235.    ? ( hello 0 )
  236.  
  237. This example uses one optional input. See the example files for other forms
  238. of names lists.
  239.    Global, free, and local variables all work as they would in lisp. All
  240. variable names in a procedure names list are local within each call to that
  241. procedure. They are free variables to all procedures called from within
  242. that procedure or at a lower level.
  243.    A procedure that includes a call to itself is called a recursive
  244. procedure.
  245.  
  246.    ? make "factorial [
  247.    1 > procedure [ [ :f ] ]
  248.    1 > output if < 1 :f [ * :f factorial - :f 1 ] [ :f ] ]
  249.    ? factorial 5
  250.    120
  251.  
  252. This procedure uses recursion to compute the factorial of its input.
  253.    A procedure in which the recursive call is the last instruction is
  254. called tail recursive. Tail recursion is handled differently by LOGO
  255. because the local variables need not be preserved. Two cases are
  256. recognized as tail recursion, a recursive call as the input to an "output"
  257. command, or a recursive call followed by a "stop" command.
  258.  
  259.    ? make "count100 [
  260.    1 > procedure [ [ :x ] ]
  261.    1 > pr :x
  262.    1 > if < :x 100 [ output count100 + :x 1 ] [ output :x ] ]
  263.  
  264.    ? make "count [
  265.    1 > procedure [ [ :x ] ]
  266.    1 > pr :x
  267.    1 > count + :x 1
  268.    1 > stop ]
  269.  
  270. In the second example the "stop" command is never executed, but it is
  271. necessary for LOGO to recognize the call to "count" as tail recursion,
  272. without it "count" would run out of memory.
  273.  
  274.  
  275. FILES                   * * * * * * * * * * * * * * * * * * * * * *
  276.  
  277.    Primitives are provided to save and load the contents of variables
  278. (including procedures), read and write data, save and load IFF images,
  279. attach icons to files, and get a filename through a file requester.
  280.    The "save" primitive saves the contents of variables to a file as "make"
  281. commands. The "load" command executes a text file as if it were typed at
  282. the command window except that comments are ignored (a comment is
  283. everything from a semicolon ";" to the end of the line).
  284.    To read or write a data file it must first be opened with "open" (a new
  285. file to be writen), or "openold" (an existing file to be read or appended).
  286. Each of these outputs a file pointer (a BCPL pointer to an AmigaDOS file
  287. handle) which must later be closed using "close". The primitives for
  288. reading and writing files accept a file-pointer as input and work much like
  289. their command window counterparts.
  290.    The "saveimage", and "loadimage" primitives copy the contents of a
  291. window to or from an IFF ILBM file. For these to work the "ILBM.Library" by
  292. Software Dissidents must be in the LIBS: directory.
  293.    The "filerequest" primitive outputs an AmigaDOS file name selected with
  294. the PathMaster file selector by Justin V. McCormick. "filerequest" may be
  295. used as input to any procedure that requires a file name.
  296.  
  297.  
  298. GRAPHICS                * * * * * * * * * * * * * * * * * * * * * *
  299.  
  300.    Much of the Amiga graphics capability is available in Power LOGO.
  301. Primitives are provided to open custom intuition screens and windows, draw
  302. lines, patterned lines, text, flood fills, and copy regions.
  303.    Graphics are rendered into windows which must first be opened with
  304. "openwindow". The window graphics primitives require a pointer to a window
  305. as an input. Coordinates within windows start with (0,0) in the upper left
  306. corner and count pixels to the right and down.
  307.  
  308.  
  309. TURTLES                 * * * * * * * * * * * * * * * * * * * * * *
  310.  
  311.    Turtles are graphics tools based on reletive movement. You may open many
  312. turtles, each is opened onto a window, has its own coordinate system, and
  313. has its own sense of location, distance, and direction, as well as its own
  314. foreground pen, background pen, draw mode, and line pattern.
  315.    By default the turtle commands control all active turtles, but may be
  316. directed to control specific turtles (active or not). Turtle operations
  317. output information about one specified turtle.
  318.  
  319.  
  320. DEMONS                  * * * * * * * * * * * * * * * * * * * * * *
  321.  
  322.    A demon may be thought of as a process separate from your main program,
  323. that keeps testing for a particular kind of event. When the event is
  324. detected the demon interupts the main program and runs a special procedure.
  325. When the procedure is complete the main program will resume.
  326.    There are four types of events that may trigger demons, menu selection,
  327. left mouse button, key stroke, and window close gadget. For each of these
  328. there is an event queue, when the event queue is not empty, the demon
  329. procedure will be run. The demon procedure must execute the appropriate get
  330. operation to remove the event from the queue, or the demon will run again
  331. and again.
  332.    For a simple example of demons in action load the file Mouse-Paint. For
  333. examples of menu demons see the files LOGO-Startup, and Mandelbrot.
  334.  
  335.  
  336. ERRORS                  * * * * * * * * * * * * * * * * * * * * * *
  337.  
  338.    Errors in syntax, or anything the interpreter does not recognize as
  339. valid LOGO instructions, should produce meaningful error messages.
  340.    Primitives that expect a pointer as input may cause LOGO to crash (guru)
  341. if passed a bad pointer.
  342.    The primitives "repitem", and "represt" destructively change an existing
  343. list and must be used carefully. If there is more than one reference to the
  344. list all references will be changed. They can also result in circular lists
  345. which appear infinite, and may cause LOGO to get stuck in a loop.
  346.  
  347.  
  348. RECOMMENDED READING     * * * * * * * * * * * * * * * * * * * * * *
  349.  
  350.    This document file describes the differences between Power LOGO and
  351. traditional versions of LOGO, these books will provide more background
  352. about LOGO. Two of these books, Computer Science Logo Style volume 1, and
  353. Visual Modeling with LOGO, include sections that may be helpful to
  354. beginners. There are many books available about programming in LOGO for
  355. beginners, however the ones that I have read are not very good, and none
  356. are listed here. 
  357.  
  358. Computer Science Logo Style
  359.    Volume 1:   Intermediate Programming, 1985.
  360.    Volume 2:   Projects, Styles, amd Techniques, 1986.
  361.    Volume 3:   Advanced Topics, 1987.
  362.    Brian Harvey
  363.    MIT Press.
  364.       These are excellent books for anyone interested in programming, and
  365.    computer science.
  366.  
  367. Mindstorms:   Children, Computers, and Powerful Ideas.
  368.    Seymour Papert
  369.    Basic Books, 1980
  370.       This book is about education and how computers and programming may be
  371.    used by children, parents, and teachers. Required reading for parents,
  372.    and teachers interested in how children can make use of computers.
  373.  
  374. Turtle Geometry:   The Computer as a Medium for Exploring Mathematics.
  375.    Harold Abelson, and Andrea diSessa
  376.    MIT Press 1981
  377.       About turtles as a tool for the study of mathematics, geometry, and
  378.    topology.
  379.  
  380. Visual Modeling with LOGO:   A Structural Approach to Seeing.
  381.    James Clayson
  382.    MIT Press, 1988
  383.       About using LOGO and turtle graphics for exploring visual ideas and 
  384.    relationships.
  385.  
  386.  
  387. LOGO PRIMITIVES         * * * * * * * * * * * * * * * * * * * * * *
  388.  
  389. Format for decriptions of primitives:
  390.  
  391. NAME           INPUTS ( OPTIONAL-INPUTS )
  392. SYNONYM        ALTERNATIVE INPUTS
  393.          INPUT = DESCRIPTION OF INPUT.
  394.    FUNCTION DESCRIPTION.
  395.  
  396. The Power LOGO primitive set:
  397.  
  398. +              number number ( number... )
  399. sum
  400.          number = Any number.
  401.    Addition, output the sum of all inputs.
  402.  
  403. -              number number ( number... )
  404. difference
  405.          number = Any number.
  406.    Subtraction, output first input minus all of the other inputs.
  407.  
  408. *              number number ( number... )
  409. product
  410.          number = Any number.
  411.    Multiplication, output product of all inputs.
  412.  
  413. /              number number ( number... )
  414. quotient
  415.          number = Any number.
  416.    Division, output first input divided by each of the other inputs.
  417.  
  418. +-             number
  419. negate
  420.          number = Any number.
  421.    Change sign, output opposite of input.
  422.  
  423. >              number number ( number... )
  424.          number = Any number.
  425.    Output true if first input is more than all others.
  426.  
  427. <              number number ( number... )
  428.          number = Any number.
  429.    Output true if first input is less than all others.
  430.  
  431. >=             number number ( number... )
  432.          number = Any number.
  433.    Output true if first input is more than or equal to all others.
  434.  
  435. <=             number number ( number... )
  436.          number = Any number.
  437.    Output true if first input is less than or equal to all others.
  438.  
  439. =0             number ( number... )
  440.          number = Any number.
  441.    Output true if all inputs are equal to zero.
  442.  
  443. <0             number ( number... )
  444.          number = Any number.
  445.    Output true if all inputs are less than zero.
  446.  
  447. >0             number ( number... )
  448.          number = Any number.
  449.    Output true if all inputs are more than zero.
  450.  
  451. abs            number
  452.          number = Any number.
  453.    Output absolute value number.
  454.  
  455. activelist
  456.    Output list of pointers to active turtles.
  457.  
  458. alphap         word word
  459.          word = Any word.
  460.    Output true if words are in alphabetical order.
  461.  
  462. and            predicate predicate ( predicate... )
  463.          predicate = true or false.
  464.    Output true if all inputs are true.
  465.  
  466. argslist
  467.    Output list of startup arguments, the first item in the argslist is the
  468.    file name of LOGO, the rest are the args from Workbench, or CLI.
  469.  
  470. ascii          word
  471.          word = Any word.
  472.    Output ASCII number of first character in word.
  473.  
  474. atan           tangent
  475.          tangent = Any number.
  476.    Inverse tangent, output angle for tangent.
  477.  
  478. back           distance ( turtle ... )
  479. bk             distance ( turtle-list )
  480.          distance = Number, distance in turtle steps.
  481.          turtle = Pointer to a turtle.
  482.          turtle-list = List of turtle pointers.
  483.    Move turtles backward distance.
  484.  
  485. buriedp        object
  486.          object = Any word or list.
  487.    Output true if input is a buried variable name.
  488.  
  489. burylist
  490.    Output list of names that are buried.
  491.  
  492. bury           name ( name... )
  493.                name-list ( name-list... )
  494.          name = Word, a variable name.
  495.          name-list = List of names.
  496.    Hide and protect input variable names (hide from make,
  497.    erase, namelist, etc.).
  498.  
  499. butfirst       object
  500. bf
  501.          object = Any word or list.
  502.    Output all but the first item of the input object.
  503.  
  504. butlast        object
  505. bl
  506.          object = Any word or list.
  507.    Output all but the last item of the input object.
  508.  
  509. catch          label run-list
  510.          label = Any word.
  511.          run-list = List of LOGO instructions.
  512.    Execute run-list, set trap for matching throw. The label "error" may be
  513.    used to trap errors.
  514.  
  515. cd             ( path )
  516.          path = An AmigaDOS directory name (word or list).
  517.    Set the current directory to the specified path, or output the current
  518.    directory.
  519.  
  520. char           ascii
  521.          ascii = Any number from 1 to 255.
  522.    Output word containing one ASCII character.
  523.  
  524. clean          ( turtle ... )
  525.                ( turtle-list )
  526.          turtle = Pointer to a turtle.
  527.          turtle-list = List of turtle pointers.
  528.    Blank turtles windows.
  529.  
  530. cleartext
  531.    Blank the command window.
  532.  
  533. closep
  534.    Output true if window-close queue is not empty.
  535.  
  536. close          file ( file... )
  537.          file = BCPL pointer to AmigaDOS file handle.
  538.    Close files.
  539.  
  540. closescreen    screen ( screen... )
  541.          screen = Pointer to an intuition screen.
  542.    Close screens.
  543.  
  544. closeturtle    turtle ( turtle... )
  545.          turtle = Pointer to a turtle.
  546.    Close turtles.
  547.  
  548. closewindow    window ( window... )
  549.          window = Pointer to an intuition window.
  550.    Close windows.
  551.  
  552. conditional    conditional-list
  553. cond
  554.          conditional-list = A list: [ predicate-list run-list ... ]
  555.             predicate-list = A run-list that outputs true or false.
  556.             run-list = List of LOGO instructions.
  557.    Execute the run-list following the first true predicate-list.
  558.  
  559. copyrect       window X Y window X Y width height
  560.          window = Pointer to an intuition window.
  561.          X = Number, pixel x coordinate.
  562.          Y = Number, pixel y coordinate.
  563.          width = Number, width of region in pixels.
  564.          height = Number, height of region in pixels.
  565.    Copy a rectangular region from window to window.
  566.  
  567. cos            angle
  568.          angle = Number representing an angle.
  569.    Output cosine of angle.
  570.  
  571. count          object
  572.          object = Any word or list.
  573.    Output number of items in object.
  574.  
  575. cursor
  576.    Output position-list of command window text cursor.
  577.  
  578. degrees
  579.    Interpret angles as degrees.
  580.  
  581. dir            ( path )
  582.          path = An AmigaDOS directory name (word or list).
  583.    Output list of contents of the specified path, or the current directory.
  584.  
  585. doscommand     command-line
  586.          command-line = List containning an AmigaDOS command line.
  587.    Run list as AmigaDOS command (as if typed at the CLI).
  588.  
  589. dot            ( turtle ... )
  590.                ( turtle-list )
  591.          turtle = Pointer to a turtle.
  592.          turtle-list = List of turtle pointers.
  593.    Mark one pixel at turtles position.
  594.  
  595. dowhile        run-list predicate-list
  596.          run-list = List of LOGO instructions.
  597.          predicate-list = A run-list that outputs true or false.
  598.    Execute run-list while predicate-list is true.
  599.  
  600. downp          turtle
  601.          turtle = Pointer to a turtle.
  602.    Output true if turtles pen is down.
  603.  
  604. draw           window X Y
  605.          window = Pointer to an intuition window.
  606.          X = Number, pixel x coordinate.
  607.          Y = Number, pixel y coordinate.
  608.    Draw from a windows graphics cursor position to position X Y.
  609.  
  610. emptyp         object
  611.          object = Any word or list.
  612.    Output true if object is the empty list or word.
  613.  
  614. eqp            object object ( object... )
  615.          object = Any word or list.
  616.    Output true if all inputs refer to the same object.
  617.  
  618. equalp         object object ( object... )
  619. =
  620.          object = Any word or list.
  621.    Output true if objects are identical.
  622.  
  623. erase          name ( name... )
  624.                name-list ( name-list... )
  625.          name = Word, a variable name.
  626.          name-list = List of names.
  627.    Remove bindings (contents) of input names that are not buried. Or remove
  628.    bindings of all input names.
  629.  
  630. error
  631.    Output list containing the error number, procedure name, primitive name,
  632.    and the offending input from the most recent error.
  633.  
  634. exor           predicate predicate
  635.          predicate = true or false.
  636.    Output true if one input is true and one is false.
  637.  
  638. filelist
  639.    Output list of pointers to all open files.
  640.  
  641. filerequest    ( title )
  642.          title = Word, title bar text.
  643.    Output file path name selected from file requester. This is the
  644.    PathMaster file selector by Justin V. McCormick.
  645.  
  646. first          object
  647.          object = Any word or list.
  648.    Output first item of object.
  649.  
  650. firstput       object object
  651. fput
  652.          object = Any word or list.
  653.    Output object made by adding first input to beginning of second input.
  654.  
  655. floodol        window X Y
  656.          window = Pointer to an intuition window.
  657.          Y = Number, pixel x coordinate.
  658.          Y = Number, pixel y coordinate.
  659.    Flood fill to outline.
  660.  
  661. forward        distance ( turtle ... )
  662. fd             distance ( turtle-list )
  663.          distance = Number, distance in turtle steps.
  664.          turtle = Pointer to a turtle.
  665.          turtle-list = List of turtle pointers.
  666.    Move turtles forward distance.
  667.  
  668. fprint         file object ( object... )
  669.          file = BCPL pointer to AmigaDOS file handle.
  670.          object = Any word or list.
  671.    Print object to file.
  672.  
  673. fprintout      file name ( name... )
  674.                file name-list ( name-list... )
  675.          file = BCPL pointer to AmigaDOS file handle.
  676.          name = Word, a variable name.
  677.          name-list = List of names.
  678.    Print names and their bindings file.
  679.  
  680. frac           number
  681.          number = Any number.
  682.    Output fractional portion of number.
  683.  
  684. freadbyte      file
  685.          file = BCPL pointer to AmigaDOS file handle.
  686.    Output one byte number read from file, Output the empty list if end
  687.    of file.
  688.  
  689. freadlist      file
  690.          file = BCPL pointer to AmigaDOS file handle.
  691.    Output list read from file (or the empty word if end of file).
  692.  
  693. fshow          file object ( object... )
  694.          file = BCPL pointer to AmigaDOS file handle.
  695.          object = Any word or list.
  696.    Print object to file.
  697.  
  698. ftype          file object ( object... )
  699.          file = BCPL pointer to AmigaDOS file handle.
  700.          object = Any word or list.
  701.    Print object to file.
  702.  
  703. fwritebyte     file number ( number... )
  704.          file = BCPL pointer to AmigaDOS file handle.
  705.          number = Any number from 0 to 255.
  706.    Write one byte numbers to file.
  707.  
  708. getclose
  709.    Output a pointer to a window from the window close event queue, wait if
  710.    the event queue is empty.
  711.  
  712. getmenu
  713.    Output list containing a pointer to the window, the menu number, item
  714.    number, and subitem number of the next item from the menu event queue,
  715.    wait if the menu event queue is empty.
  716.  
  717. getmouse
  718.    Output list containing a pointer to the window, the X position, and Y
  719.    position where the mouse was when the button was pressed, wait if the
  720.    mouse event queue is empty.
  721.  
  722. getprop        name property
  723. gprop
  724.          name = Word, name of a veriable containing a property list.
  725.          property = Word, label of an object in a property list.
  726.    Output specified object from a property list.
  727.  
  728. heading        turtle
  729.          turtle = Pointer to a turtle.
  730.    Output a turtles heading.
  731.  
  732. home           ( turtle ... )
  733.                ( turtle-list )
  734.          turtle = Pointer to a turtle.
  735.          turtle-list = List of turtle pointers.
  736.    Move turtles to position (0,0) set heading to 0.
  737.  
  738. if             predicate run-list run-list
  739.          predicate = true or false.
  740.          run-list = List of LOGO instructions.
  741.    If predicate is true execute first run-list, if false execute second
  742.    run-list. Both run-lists are required, if one case is not used, use the 
  743.    empty list [ ].
  744.  
  745. int            number
  746.          number = Any number.
  747.    Output integer portion of number.
  748.  
  749. intuition      action pointer ( ?... )
  750.          action = A number from 1 to 11, specifing action to be taken.
  751.          pointer = A pointer to an intuition screen or window.
  752.          ? = Listed below.
  753.    Eleven commands in one, to modify screens, windows, and menus.
  754.  
  755.                1 screen X Y
  756.          X = Number, pixel x coordinate.
  757.          Y = Number, pixel y coordinate.
  758.    Move screen (screen = @0 for workbench screen).
  759.  
  760.                2 window X Y
  761.          X = Number, pixel x coordinate.
  762.          Y = Number, pixel y coordinate.
  763.    Move window (window = @0 for command window).
  764.  
  765.                3 window menu item subitem
  766.          menu, item, subitem = Numbers specifing a menu or item.
  767.    Off menu (window = @0 for command window).
  768.  
  769.                4 window menu item subitem
  770.          menu, item, subitem = Numbers specifing a menu or item.
  771.    On menu (window = @0 for command window).
  772.  
  773.                5 screen
  774.    Screen to back (screen = @0 for workbench screen).
  775.  
  776.                6 screen
  777.    Screen to front (screen = @0 for workbench screen).
  778.  
  779.                7 screen showit
  780.          showit = Number.
  781.    Show screen title (number <> 0) hide title (number = 0).
  782.  
  783.                8 window width height
  784.          width = Number, width of window in pixels.
  785.          height = Number, height of window in pixels.
  786.    Size window (window = @0 for command window).
  787.  
  788.                9 window MinWidth MinHeight MaxWidth MaxHeight
  789.          MinWidth   \
  790.          MinHeight   \
  791.          MaxWidth    /  = Numbers, sizes in pixels.
  792.          MaxHeight  /
  793.    Set window limits (window = @0 for command window).
  794.  
  795.                10 window
  796.    Window to back (window = @0 for command window).
  797.  
  798.                11 window
  799.    Window to front (window = @0 for command window).
  800.  
  801. item           element object
  802.          element = Number, index to item. 
  803.          object = Any word or list.
  804.    Output specified item from object.
  805.  
  806. items          first count object
  807.          first = Number, index to first item.
  808.          count = Number of items.
  809.          object = Any word or list.
  810.    Output specified items from object.
  811.  
  812. keyp
  813.    Output true if character queue is not empty.
  814.  
  815. last           object
  816.          object = Any word or list.
  817.    Output last item from object.
  818.  
  819. lastput        object object
  820. lput
  821.          object = Any word or list.
  822.    Output object made by adding first input to end of second input.
  823.  
  824. left           angle ( turtle ... )
  825. lt             angle ( turtle-list )
  826.          angle = Number representing an angle.
  827.          turtle = Pointer to a turtle.
  828.          turtle-list = List of turtle pointers.
  829.    Rotate turtle left.
  830.  
  831. linep
  832.    Output true if command window input line queue is not empty.
  833.  
  834. listp          object
  835.          object = Any word or list.
  836.    Output true if object is a list.
  837.  
  838. list           object object ( object... )
  839.          object = Any word or list.
  840.    Output list containing input objects.
  841.  
  842. load           file-name ( file-name... )
  843.          file-name = An AmigaDOS file name (word or list).
  844.    Load file, runs a text file as if it were typed at the keybord.
  845.  
  846. loadimage      window file-name
  847.          window = Pointer to an intuition window.
  848.          file-name = An AmigaDOS file name (word or list).
  849.    Load a window from an IFF ILBM file. Requires "ilbm.library" from
  850.    Dissidents Software. BUG: sometimes loads entire screen.
  851.  
  852. log            base number
  853.          base = Positive number.
  854.          number = Positive number.
  855.    Output logarithm of the number to the base.
  856.  
  857. make           name object
  858.          name = Word, a variable name.
  859.          object = Any word or list.
  860.    Make object the contents of name (bind object to name). Make is the LOGO
  861.    variable assignment operator. 
  862.  
  863. memberp        object object
  864.          object = Any word or list.
  865.    Output true if second object contains first object.
  866.  
  867. menup
  868.    Output true if menu queue is not empty.
  869.  
  870. mousep
  871.    Output true if mouse-button queue is not empty.
  872.  
  873. mouse          window
  874.          window = Pointer to an intuition window.
  875.    Output list containing the X position, Y position and button position of
  876.    the mouse reletive to the window.
  877.  
  878. move           window X Y
  879.          window = Pointer to an intuition window.
  880.          X = Number, pixel x coordinate.
  881.          Y = Number, pixel y coordinate.
  882.    Move a windows graphics cursor to position X Y.
  883.  
  884. namelist
  885.    Output list of variable names in use.
  886.  
  887. namep          object
  888.          object = Any word or list.
  889.    Output true if object is a variable name.
  890.  
  891. new
  892.    Remove bindings of all names (erase), close all files, close all
  893.    turtles, close all windows, close all screens, clear all menus, clear
  894.    all demons, flush all input queues, return to top level.  
  895.  
  896. not            predicate
  897.          predicate = true or false.
  898.    Output true if input is false output false if input is true.
  899.  
  900. numberp        object
  901.          object = Any word or list.
  902.    Output true if object is a number.
  903.  
  904. open           file-name
  905.          file-name = An AmigaDOS file name (word or list).
  906.    Create or open file to be written, output BCPL pointer to an AmigaDOS
  907.    file handle.
  908.  
  909. openold        file-name
  910.          file-name = An AmigaDOS file name (word or list).
  911.    Open existing file to be read or written, output BCPL pointer to an
  912.    AmigaDOS file handle.
  913.  
  914. openscreen     vm ( d t le te w h dp bp )
  915.                screen-data-list
  916.          vm = Number, viewport modes, sum of: 
  917.                   1 = hires
  918.                   2 = lace
  919.                   4 = extra half brite
  920.          d = Number of bit planes.
  921.          t = List, title bar text.
  922.          le = Number, left edge.
  923.          te = Number, top edge.
  924.          w = Number, width.
  925.          h = Number, height.
  926.          dp = Number, detail pen.
  927.          bp = Number, block pen.
  928.          screen-data-list = List containing some or all of the above.
  929.             Default screen-data-list = [ 0 2 [ ] 0 0 320 200 0 1 ]
  930.                if view modes = hires then default width = 640
  931.                if view modes = lace then default height = 400
  932.                if view modes = extra half brite then default depth = 6
  933.    Open an intuition graphics screen, output pointer to the screen.
  934.  
  935. openturtle     window ( mag ar X Y h t )
  936.                turtle-data-list
  937.          window = Pointer to an intuition window.
  938.          mag = Number, scale or magnification.
  939.          ar = Number, aspect ratio, pixel width / height.
  940.          X = Number, pixel x coordinate of home.
  941.          Y = Number, pixel y coordinate of home.
  942.          h = Number, heading of home.
  943.          t = Number, turning direction, >= 0 clockwise,
  944.              < 0 counterclockwise.
  945.          turtle-data-list = List containing some or all of the above.
  946.             Defaults:
  947.                mag   lores    1.8
  948.                      hires    3.2
  949.                      This means it takes 200 steps to go from the
  950.                      left edge to the right edge of a full screen.
  951.                ar    lores          0.88
  952.                      hires          0.44
  953.                      lores lace     1.76
  954.                      hires lace     0.88
  955.                      This makes circles look round and squares look
  956.                      square.
  957.                X, Y  The current center of the window.
  958.                h     0  Straight up.
  959.                t     0  Clockwise.
  960.    Open a turtle, output pointer to the turtle.
  961.  
  962.  
  963.  
  964. openwindow     screen ( f t le te w h dp bp minw minh maxw maxh )
  965.                window-data-list
  966.          screen = Pointer to an intuition screen, @0 for workbench screen.
  967.          f = Number, flags, sum of:
  968.                   1 = drag gadget
  969.                   2 = depth gadget
  970.                   4 = close gadget
  971.                   8 = size gadget
  972.                   16 = give me zero zero
  973.                   32 = backdrop
  974.                   64 = borderless
  975.                   128 = activate
  976.          t = List, title bar text.
  977.          le = Number, left edge.
  978.          te = Number, top edge.
  979.          w = Number, width.
  980.          h = Number, height.
  981.          dp = Number, detail Pen.
  982.          bp = Number, block Pen.
  983.          minw = Number, minimum width.
  984.          minh = Number, minimum height.
  985.          maxw = Number, maximum width.
  986.          maxh = Number, maximum height.
  987.          window-data-list = List containing some or all of the above.
  988.             Default window-data-list WorkBench screen:
  989.                   [ @0 3 [ ] 0 0 320 200 0 1 30 30 640 400 ]
  990.             Default window for custom screen:
  991.                   Backdrop borderless window to fit the screen.
  992.    Open an intuition graphics window, output pointer to the window.
  993.  
  994. or             predicate predicate ( predicate... )
  995.          predicate = true or false.
  996.    Output true if any inputs are true.
  997.  
  998. output         object
  999. op
  1000.          object = Any word or list.
  1001.    Exit procedure, return object as the procedures output.
  1002.  
  1003. pd             ( turtle ... )
  1004.                ( turtle-list )
  1005.          turtle = Pointer to a turtle.
  1006.          turtle-list = List of turtle pointers.
  1007.    Pen down, lower the turtles pen.
  1008.  
  1009. peek           bytes address
  1010.          bytes = Number, one of:
  1011.                   0     32 bit pointer
  1012.                   1     8 bit unsigned integer
  1013.                  -1     8 bit signed integer
  1014.                   2     16 bit unsigned integer
  1015.                  -2     16 bit signed integer
  1016.                   4     32 bit unsigned integer
  1017.                  -4     32 bit signed integer
  1018.                   8     64 bit IEEE double floating point number
  1019.          address = Number, or pointer, a memory address.
  1020.    Output number contained at address.
  1021.  
  1022. pen            window ( type )
  1023.          window = Pointer to an intuition window (@0 for command window).
  1024.          type = Number, which pen:
  1025.                   0     foreground pen (default)
  1026.                   1     background pen
  1027.                   2     area outline pen
  1028.    Output the windows pen number.
  1029.  
  1030. poerror
  1031.    Print out error message.
  1032.  
  1033. pointerp       object
  1034.          object = Any word or list.
  1035.    Output true if object is a pointer.
  1036.  
  1037. poke           bytes address number ( number... )
  1038.          bytes = Number of bytes:
  1039.                   1     8 bit integer
  1040.                   2     16 bit integer
  1041.                   4     32 bit integer or pointer
  1042.                   8     64 bit IEEE double floating point number
  1043.          address = Number, or pointer, a memory address.
  1044.          number = Number, or pointer, limited in size by number of bytes.
  1045.    Write numbers to memory address.
  1046.  
  1047. power          base exponent
  1048.          base = Any number.
  1049.          exponent = Number, if base < 0 then exponent must be an integer.
  1050.    Output base to the power of exponent.
  1051.  
  1052. precision      ( digits )
  1053.          digits = Number from 0 to 15.
  1054.    Sets or outputs precision used by print, fprint, type, ftype, and text
  1055.    when printing numbers.
  1056.  
  1057. primitivep     object
  1058.          object = Any word or list.
  1059.    Output true if object is a primitive.
  1060.  
  1061. print          object ( object... )
  1062. pr
  1063.          object = Any word or list.
  1064.    Print object to command window.
  1065.  
  1066. printout       name ( name... )
  1067. po             name-list ( name-list... )
  1068.          name = Word, a variable name.
  1069.          name-list = List of names.
  1070.    Print names and their bindings to command window.
  1071.  
  1072. procedurep     object
  1073.          object = Any word or list.
  1074.    Output true if object is a user defined procedure.
  1075.  
  1076. psum           address number ( number... )
  1077.          address = Number, or pointer, a memory address.
  1078.          number = Any number.
  1079.    Output pointer equal to sum of address and numbers.
  1080.  
  1081. pu             ( turtle... )
  1082.                ( turtle-list )
  1083.          turtle = Pointer to a turtle.
  1084.          turtle-list = List of turtle pointers.
  1085.    Pen up, raise the turtles pen.
  1086.  
  1087. putprop        name property object
  1088. pprop
  1089.          name = Word, name of a veriable containing a property list.
  1090.          property = Word, label of an object in a property list.
  1091.          object = Any word or list.
  1092.    Place object into a property list.
  1093.  
  1094. quit
  1095.    Exit LOGO return to WorkBench or CLI.
  1096.  
  1097. radians
  1098.    Interpret angles as radians.
  1099.  
  1100. rand
  1101.    Output random fraction from zero to less than one.
  1102.  
  1103. random         range
  1104.          range = Number, positive integer.
  1105.    Output random integer from zero to less than number.
  1106.  
  1107. readchar
  1108. rc
  1109.    Output one character word typed at keybord. Reads characters from
  1110.    windows other than the command window. Waits if character event queue
  1111.    is empty.
  1112.  
  1113. readlist
  1114. rl
  1115.    Output line typed at keybord as a list. Reads lines from the command
  1116.    window. Waits if line queue is empty.
  1117.  
  1118. readpixel      window X Y
  1119.          window = Pointer to an intuition window.
  1120.          X = Number, pixel x coordinate.
  1121.          Y = Number, pixel y coordinate.
  1122.    Output pen number of pixel at position (X,Y).
  1123.  
  1124. rectfill       window l t r b
  1125.          window = Pointer to an intuition window.
  1126.          l = Number, left edge of rectangle in pixels.
  1127.          t = Number, top edge of rectangle in pixels.
  1128.          r = Number, right edge of rectangle in pixels.
  1129.          b = Number, bottom edge of rectangle in pixels.
  1130.    Fill rectangle from (l,t) to (r,b).
  1131.  
  1132. recycle        ( number )
  1133.          number = Any number.
  1134.    Without an input, recycles memory and frees any unused blocks.
  1135.    With an input, just recycles memory.
  1136.  
  1137. remainder      number number
  1138.          number = Any number.
  1139.    Output remainder after division.
  1140.  
  1141. remprop        name property
  1142.          name = Word, name of a veriable containing a property list.
  1143.          property = Word, label of an object in a property list.
  1144.    Remove object from a property list.
  1145.  
  1146. repeat         number run-list
  1147.          number = Number, positive integer.
  1148.          run-list = List of LOGO instructions.
  1149.    Execute run-list number of times.
  1150.  
  1151. repitem        item list object
  1152.          item = Number, index into list.
  1153.          list = Any list.
  1154.          object = Any word or list.
  1155.    Replace specified item of list with object. This is similar to "rplaca"
  1156.    in Lisp. WARNING: repitem destructively changes an existing list and you
  1157.    may obtain unexpected results if there is more than one reference to the
  1158.    list.
  1159.  
  1160. represt        item list object
  1161.          item = Number, index into list.
  1162.          list = Any list.
  1163.          object = Any word or list.
  1164.    Replace rest of list after specified item with object. This is similar
  1165.    to "rplacd" in Lisp. WARNING: represt destructively changes an existing
  1166.    list and you may obtain unexpected results if there is more than one
  1167.    reference to the list.
  1168.  
  1169. restof         number object
  1170.          item = Number, index into object.
  1171.          object = Any word or list.
  1172.    Output rest of object following specified item.
  1173.  
  1174. rgb            screen index
  1175.          screen = Pointer to an intuition screen.
  1176.          index = Number, index into the screens color table.
  1177.    Output list containing red, green, and blue value of the screens
  1178.    specified color.
  1179.  
  1180. right          angle ( turtle ... )
  1181. rt             angle ( turtle-list )
  1182.          angle = Number representing an angle.
  1183.          turtle = Pointer to a turtle.
  1184.          turtle-list = List of turtle pointers.
  1185.    Rotate turtle right.
  1186.  
  1187. round          number
  1188.          number = Any number.
  1189.    Output number rounded to nearest integer.
  1190.  
  1191. run            run-list
  1192.          run-list = List of LOGO instructions.
  1193.    Execute run-list.
  1194.  
  1195. save           file-name name ( name... )
  1196.                file-name name-list ( name-list... )
  1197.          file-name = An AmigaDOS file name (word or list).
  1198.          name = Word, a variable name.
  1199.          name-list = List of names.
  1200.    Save variable names and their contents to file.
  1201.  
  1202. saveicon       file-name ( default-tool tool-types )
  1203.          file-name = An AmigaDOS file name (".info" will be added).
  1204.          default-tool = Word.
  1205.          tool-types = List of up to three words.
  1206.    Attach icon to file.
  1207.  
  1208. saveimage      window file-name
  1209.          window = Pointer to an intuition window.
  1210.          file-name = An AmigaDOS file name (word or list).
  1211.    Save a window to an IFF ILBM file. Requires "ilbm.library" from
  1212.    Dissidents Software. BUG: sometimes saves entire screen.
  1213.  
  1214. screenlist
  1215.    Output list of pointers to all open screens.
  1216.  
  1217. seconds
  1218.    Output system clock time in seconds.
  1219.  
  1220. seedrand       ( number )
  1221.          number = Any number.
  1222.    Re-seed random number generator.
  1223.  
  1224. seekend        file
  1225.          file = BCPL pointer to AmigaDOS file handle.
  1226.    Move to end of file.
  1227.  
  1228. seekstart      file
  1229.          file = BCPL pointer to AmigaDOS file handle.
  1230.    Move to start of file.
  1231.  
  1232. sentence       object object ( object... )
  1233. se
  1234.          object = Any word or list.
  1235.    Output list of input objects. Lists in the input to sentence will have
  1236.    their outer brackets removed. "sentence" always creates a new list.
  1237.  
  1238. setafpt        window pattern-list
  1239.          window = Pointer to an intuition window.
  1240.          pattern-list = A list of up to 16 words, each 16 characters long
  1241.                         where "x" is an on pixel, any other character is an
  1242.                         off pixel.
  1243.    Set area fill pattern.
  1244.  
  1245. setcursor      position
  1246.          position = List of two numbers, X, and Y coordinates.
  1247.    Set command window text cursor position.
  1248.  
  1249. setdrmode      window mode
  1250.          window = Pointer to an intuition window (@0 for command window).
  1251.          mode = Number, sum of:
  1252.                   0 = JAM1
  1253.                   1 = JAM2
  1254.                   2 = COMPLEMENT
  1255.                   4 = INVERSVID
  1256.    Set a windows draw mode.
  1257.  
  1258. setfont        window font-name font-height
  1259.          window = Pointer to an intuition window (@0 for command window).
  1260.          font-name = Word.
  1261.          font-height = Number.
  1262.    Set a windows text font.
  1263.  
  1264. seth           angle ( turtle ... )
  1265.                angle ( turtle-list )
  1266.          angle = Number representing an angle.
  1267.          turtle = Pointer to a turtle.
  1268.          turtle-list = List of turtle pointers.
  1269.    Set turtles heading.
  1270.  
  1271. setlinept      window pattern
  1272.          window = Pointer to an intuition window.
  1273.          pattern = Word 16 characters long where "x" is an on pixel, any
  1274.                    other character is an off pixel.
  1275.    Set a windows line pattern.
  1276.  
  1277. setmenu        window menu-list
  1278.          window = Pointer to an intuition window (@0 for command window).
  1279.          menu-list = List of menu text:
  1280.                            [ menu-name-1 [ item-1-1 K ]
  1281.                                          [ item-1-2 [ subitem-1-2-1 K ]
  1282.                                                     [ subitem-1-2-2 K ] ]
  1283.                              menu-name-2 [ item-2-1 ]
  1284.                                          [ item-2-2 ] ]
  1285.                      (where "K" is a keybord short cut)
  1286.    Attach a menu strip to the window.
  1287.  
  1288. setpen         window pen ( type )
  1289.          window = Pointer to an intuition window (@0 for command window).
  1290.          pen = Number of pen.
  1291.          type = Number, which pen:
  1292.                   0     foreground pen (default)
  1293.                   1     background pen
  1294.                   2     area outline pen
  1295.    Set a windows pen number.
  1296.  
  1297. setrgb         screen index rgb-list
  1298.          screen = Pointer to an intuition screen.
  1299.          index = Number, index into color registers table.
  1300.          rgb-list = List of three numbers, containing red, green, and blue
  1301.                     value of the color.
  1302.    Set a screens color register.
  1303.  
  1304. setstyle       window style
  1305.          window = Pointer to an intuition window (@0 for command window).
  1306.          style = Number, sum of:
  1307.                   0 = plain
  1308.                   1 = underlined
  1309.                   2 = bold
  1310.                   4 = italic
  1311.    Set the text rendering style.
  1312.  
  1313. settdm         mode ( turtle ... )
  1314.                mode ( turtle-list )
  1315.          mode = Number, sum of:
  1316.                   0 = JAM1
  1317.                   1 = JAM2
  1318.                   2 = COMPLEMENT
  1319.                   4 = INVERSVID
  1320.          turtle = Pointer to a turtle.
  1321.          turtle-list = List of turtle pointers.
  1322.    Set turtles draw mode.
  1323.  
  1324. settlp         pattern ( turtle ... )
  1325.                pattern ( turtle-list )
  1326.          pattern = Word 16 characters long where "x" is an on pixel, any other
  1327.                    character is an off pixel.
  1328.          turtle = Pointer to a turtle.
  1329.          turtle-list = List of turtle pointers.
  1330.    Set turtle line pattern.
  1331.  
  1332. settpn         pen type ( turtle ... )
  1333.                pen type ( turtle-list )
  1334.          pen = Number of pen.
  1335.          type = Number, which pen:
  1336.                   0     foreground pen
  1337.                   1     background pen
  1338.          turtle = Pointer to a turtle.
  1339.          turtle-list = List of turtle pointers.
  1340.    Set turtles pen number.
  1341.  
  1342. settpos        position ( turtle ... )
  1343.                position ( turtle-list )
  1344.          position = List of two numbers, X, and Y coordinates.
  1345.          turtle = Pointer to a turtle.
  1346.          turtle-list = List of turtle pointers.
  1347.    Set turtles position.
  1348.  
  1349. show           object ( object... )
  1350.          object = Any word or list.
  1351.    Print object to command window.
  1352.  
  1353. sin            angle
  1354.          angle = Number representing an angle.
  1355.    Output sine of angle.
  1356.  
  1357. sleep
  1358.    Wait for an event (mouse, menu, keyboard, or window close).
  1359.  
  1360. sqrt           number
  1361.          number = Positive number.
  1362.    Output square root of number.
  1363.  
  1364. stick
  1365.    Output list containing the X position, Y position and button position of
  1366.    a joystick in port number two.
  1367.  
  1368. stop
  1369.    Exit procedure.
  1370.  
  1371. system         action ( ? )
  1372.          action = A number from 1 to 14, specifing action to be taken.
  1373.          ? = Listed below.
  1374.    Fourteen commands in one, to control memory, libraries, and demons. 
  1375.  
  1376.                1
  1377.    Output the amount of memory LOGO tries to hold in reserve.
  1378.  
  1379.                2 bytes
  1380.          bytes = Number of bytes.
  1381.    Set the amount of memory LOGO tries to hold in reserve.
  1382.  
  1383.                3 bytes
  1384.          bytes = Number of bytes.
  1385.    Allocate memory, output pointer to block.
  1386.  
  1387.                4 bytes
  1388.          bytes = Number of bytes.
  1389.    Allocate chip memory, output pointer to block.
  1390.  
  1391.                5 pointer
  1392.          pointer = Pointer to allocated memory.
  1393.    Free memory.
  1394.  
  1395.                6
  1396.    Output list of pointers to allocated memory blocks.
  1397.  
  1398.                7
  1399.    Open Diskfont library.
  1400.  
  1401.                8
  1402.    Close Diskfont library.
  1403.  
  1404.                9
  1405.    Open ILBM library.
  1406.  
  1407.                10
  1408.    Close ILBM library.
  1409.  
  1410.                11
  1411.    Enable demons.
  1412.  
  1413.                12
  1414.    Disable demons.
  1415.  
  1416.                13
  1417.    Open Icon library.
  1418.  
  1419.                14
  1420.    Close Icon library.
  1421.  
  1422. tan            angle
  1423.          angle = Number representing an angle.
  1424.    Output tangent of angle.
  1425.  
  1426. tell           turtle ( turtle... )
  1427.                turtle-list
  1428.          turtle = Pointer to a turtle.
  1429.          turtle-list = List of turtle pointers.
  1430.    Make these the active turtles.
  1431.  
  1432. text           window object
  1433.          window = Pointer to an intuition window.
  1434.          object = Any word or list.
  1435.    Print text to a custom window.
  1436.  
  1437. thing          name
  1438.          name = Word, a variable name.
  1439.    Output object bound to name (contents of variable).
  1440.  
  1441. throw          label
  1442.          label = Any word.
  1443.    Escape to catch with matching label.
  1444.  
  1445. toplevel
  1446.    Exit program return to top level.
  1447.  
  1448. toward         position turtle
  1449.          position = List of two numbers, X, and Y coordinates.
  1450.          turtle = Pointer to a turtle.
  1451.    Output heading to point turtle toward position.
  1452.  
  1453. tpen           turtle ( type )
  1454.          turtle = Pointer to a turtle.
  1455.          type = Number, which pen:
  1456.                   0     foreground pen (default)
  1457.                   1     background pen
  1458.    Output the turtles pen number.
  1459.  
  1460. tpos           turtle
  1461.          turtle = Pointer to a turtle.
  1462.    Output a list containing the turtles position.
  1463.  
  1464. turtlelist
  1465.    Output list of pointers to all open turtles.
  1466.  
  1467. turtleoff      ( turtle ... )
  1468.                ( turtle-list )
  1469.          turtle = Pointer to a turtle.
  1470.          turtle-list = List of turtle pointers.
  1471.    Deactivate turtles.
  1472.  
  1473. turtleon       ( turtle ... )
  1474.                ( turtle-list )
  1475.          turtle = Pointer to a turtle.
  1476.          turtle-list = List of turtle pointers.
  1477.    Activate turtles.
  1478.  
  1479. twpos          turtle
  1480.          turtle = Pointer to a turtle.
  1481.    Output Turtles position in window coordinates.
  1482.  
  1483. type           object ( object... )
  1484.          object = Any word or list.
  1485.    Print object to command window.
  1486.  
  1487. unbury         name ( name... )
  1488.                name-list ( name-list... )
  1489.          name = Word, a variable name.
  1490.          name-list = List of names.
  1491.    Make variable names accessable.
  1492.  
  1493. wait           seconds
  1494.          seconds = Positive number.
  1495.    Pause for a number of seconds.
  1496.  
  1497. whenchar       run-list
  1498.          run-list = List of LOGO instructions.
  1499.    Set demon to run when key stroke is detected. Run-list must execute a
  1500.    "readchar" to clear the character queue.
  1501.  
  1502. whenclose      run-list
  1503.          run-list = List of LOGO instructions.
  1504.    Set demon to run when window-close is detected. Run-list must execute a
  1505.    "getclose" to clear the window-close queue.
  1506.  
  1507. whenmenu       run-list
  1508.          run-list = List of LOGO instructions.
  1509.    Set demon to run when menu item is selected. Run-list must execute a
  1510.    "getmenu" to clear the menu-selection queue.
  1511.  
  1512. whenmouse      run-list
  1513.          run-list = List of LOGO instructions.
  1514.    Set demon to run when mouse-button is pressed. Run-list must execute a
  1515.    "getmouse" to clear the mouse-button queue.
  1516.  
  1517. while          predicate-list run-list
  1518.          predicate-list = A run-list that outputs true or false.
  1519.          run-list = List of LOGO instructions.
  1520.    While predicate-list is true, repeat run-list.
  1521.  
  1522. window         ( turtle ... )
  1523.                ( turtle-list )
  1524.          turtle = Pointer to a turtle.
  1525.          turtle-list = List of turtle pointers.
  1526.    Allow turtle to move beyond edges of window.
  1527.  
  1528. windowlist
  1529.    Output list of pointers to all open windows.
  1530.  
  1531. word           word word ( word... )
  1532.          word = Any word.
  1533.    Output word made up of input words.
  1534.  
  1535. wordp          object
  1536.          object = Any word or list.
  1537.    Output true if object is a word.
  1538.  
  1539. wrap           ( turtle ... )
  1540.                ( turtle-list )
  1541.          turtle = Pointer to a turtle.
  1542.          turtle-list = List of turtle pointers.
  1543.    Make turtle wrap around at edges of window.
  1544.  
  1545. writepixel     window X Y
  1546.          window = Pointer to an intuition window.
  1547.          X = Number, pixel x coordinate.
  1548.          Y = Number, pixel y coordinate.
  1549.    Set pixel (X,Y) to the pen color.
  1550.  
  1551. wtpos          turtle
  1552.          turtle = Pointer to a turtle.
  1553.    Output windows position in turtle coordinates.
  1554.  
  1555.  
  1556. PLEASE HELP ME          * * * * * * * * * * * * * * * * * * * * * *
  1557.  
  1558.    Help me to improve this version of LOGO. Please contact me with any
  1559. comments or bug reports.
  1560.  
  1561.    Gary Teachout 
  1562.    10532  66 Place, W
  1563.    Everett, WA  98204
  1564.    USA
  1565.  
  1566.